package com.starsoft.smdc.bean;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * SmdcErId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class SmdcErId implements java.io.Serializable {

	// Fields

	private String secId;
	private Date reportDate;

	// Constructors

	/** default constructor */
	public SmdcErId() {
	}

	/** full constructor */
	public SmdcErId(String secId, Date reportDate) {
		this.secId = secId;
		this.reportDate = reportDate;
	}

	// Property accessors

	@Column(name = "secId", nullable = false, length = 10)
	public String getSecId() {
		return this.secId;
	}

	public void setSecId(String secId) {
		this.secId = secId;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "report_date", nullable = false, length = 10)
	public Date getReportDate() {
		return this.reportDate;
	}

	public void setReportDate(Date reportDate) {
		this.reportDate = reportDate;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof SmdcErId))
			return false;
		SmdcErId castOther = (SmdcErId) other;

		return ((this.getSecId() == castOther.getSecId()) || (this.getSecId() != null && castOther.getSecId() != null
				&& this.getSecId().equals(castOther.getSecId())))
				&& ((this.getReportDate() == castOther.getReportDate())
						|| (this.getReportDate() != null && castOther.getReportDate() != null
								&& this.getReportDate().equals(castOther.getReportDate())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + (getSecId() == null ? 0 : this.getSecId().hashCode());
		result = 37 * result + (getReportDate() == null ? 0 : this.getReportDate().hashCode());
		return result;
	}

}